package org.totoro.patterns.behavior.interpreter.demo;

/**
 * @author YHL
 * @version V1.0
 * @Description:
 * @date 2018-11-20
 */
public class Client {

    public static void main(String[] args) {

        CompoundPredicate eq = Expressions.and(Expressions.eq("张三", Expressions.valueExpression("你好")))
                .add("张三", Expressions.valueExpression("你好"));

        CompoundPredicate add = Expressions.and().add(eq).add(eq).add(eq);

        CompoundPredicate add1 = Expressions.and(add).add("yhl", Expressions.valueExpression(
                "yhl"));

        System.out.println(add1);


    }

    private static void eq() {

        OperatorPredicate eq = Expressions.eq("你好", Expressions.valueExpression("你好"));

        Boolean evaluate = eq.evaluate(null);

        System.out.println(evaluate);
    }
}
